home *** CD-ROM | disk | FTP | other *** search
/ Aminet 44 / Aminet 44 (2001)(GTI - Schatztruhe)[!][Aug 2001].iso / Aminet / comm / misc / Sashi89.lha / Sashi89 / sources / main.c < prev    next >
C/C++ Source or Header  |  2001-05-08  |  475b  |  36 lines

  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <signal.h>
  4.  
  5. #include "hard.h"
  6.  
  7. int debug_mode=1;
  8.  
  9. void clean_up(int toto )
  10. {
  11.     ti_closeport();
  12.     exit(1);
  13. }
  14. int main()
  15. {
  16.     UBYTE r;
  17.     int c;
  18.  
  19.     ti_openport();
  20.     
  21.     signal(SIGINT,&clean_up);
  22.  
  23.     do
  24.     {
  25.         printf("%d %d\n",ti_getbit(1),ti_getbit(2));;
  26.         ti_setbit(1,1);
  27.         printf("%d %d\n",ti_getbit(1),ti_getbit(2));;
  28.         ti_setbit(0,1);
  29.         printf("%d %d\n",ti_getbit(1),ti_getbit(2));;
  30.         c=getchar();
  31.     }
  32.     while( c!= 'q');
  33.     ti_closeport();
  34.  
  35. }
  36.